class Animal:
    def speak(self):
        pass

class Dog:
    def speak(self):
        print("汪汪汪")

class Cat:
    def speak(self):
        print("喵喵喵")

def make_noise(animal:Animal):
    animal.speak()

# 演示多态
dog = Dog()
cat = Cat()

make_noise(dog)
make_noise(cat)